import { Component } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  constructor(private router:Router){
  }
  title = 'angular-proj';
  homeOnselect():string{
    let url:string = this.router.url.toString()
    if(url.match('/home')){
      return 'onselect'
    }
    else{
      return 'notonselect'
    }
  }
  personOnselect():string{
    let url:string = this.router.url.toString()
    if(url.match('/person')){
      return 'onselect'
    }
    else{
      return 'notonselect'
    }
  }
}
